#ifndef CARTE_H
#define CARTE_H

#define MARGE_TOP 87
#define MARGE_LEFT 55
#define TAB_LENGTH 34
#define TAB_HEIGHT 28
#define PORTEE 3000

#include "Camp.hpp"

class Carte
{
    public:
        Carte();
        void setNbTerr(int nbTerr);
        int getNbTerr() const;
		void setTab( int t);
        void setCentre(int indice,const sf::Vector2i& v);
        const sf::Vector2i& getCentre(int indice) const;
		sf::Vector2i* getCentres();
        void genererCarte(int nbJ,int nbTerrpJ);
        void genererCarteClient(int nbJ,int nbTerrpJ);
        bool composante() const;
        void repartirTerritoires(int nbJ,int nbTerrpJ,Camp camps[]);
        void updateTexture(sf::Sprite& cible);
        void creerGrilleSelection();
	void clear();
        void selectionnerTerritoire(int positionX,int positionY,int& indiceSelection) const;
        virtual ~Carte();

        sf::Vector3i** grilleSelection;
        Territoire** territoires;
        sf::RenderTexture textureCarte;
    protected:
    private:
        int nbTerr;
        sf::Vector2i* centres;

        void auxComposante(bool tab[],int indice) const;
};

#endif // CARTE_H
